package ch09;

public class Manager extends SalariedEmployee
{
   private double weeklyBonus;
   private String department;

   /**
      Constructs a manager with a given name, annual salary and weekly bonus.
      @param name the name of this employee
      @param salary the annual salary
      @param bonus the weekly bonus
    */
   public Manager(String name, double salary, double bonus, String department)
   {
      super(name, salary);
      weeklyBonus = bonus;
      this.department = department;
   }

   public double weeklyPay(int hours)
   {
      return super.weeklyPay(hours) + weeklyBonus;
   }
   
   public String toString()
   {
	   String returnValue = "This is " + getName() + " working at " + department + " earning " + weeklyPay(20);
	   return returnValue;
   }
}


